import { StyleSheet } from 'react-native'
import React from 'react'
import { HStack, Spinner, Heading } from 'native-base'

const Loading = ({ status = 'more' }) => {
  // more、noMore、loading
  return (
    <HStack space={2} alignItems="center" justifyContent="center">
      {
        status === 'loading' && <Spinner accessibilityLabel="Loading posts" />
      }
      <Heading color="primary.500" fontSize="md">
        {
          status === 'loading' ? '加载中' : status === 'noMore' ? '没有更多数据了': '加载更多'
        }
      </Heading>
    </HStack>
  )
}

export default Loading

const styles = StyleSheet.create({})